﻿#include "CmdSaveModelDisplaySettingData.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdSaveModelDisplaySettingData::CmdSaveModelDisplaySettingData()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdSaveModelDisplaySettingData::~CmdSaveModelDisplaySettingData()
    {
    }

    bool CmdSaveModelDisplaySettingData::execute()
    {
        emit IBaseSignalInstance->signal_saveModelDisplaySettingData(m_windowUniversalID, m_toolButtonActiveClipperIsChecked,
                                                                     m_toolButtonModelDisplayIsChecked, m_hasAnyGeometrySuccess);
        return true;
    }

    void CmdSaveModelDisplaySettingData::undo()
    {
    }

    void CmdSaveModelDisplaySettingData::redo()
    {
        // execute();
    }

    void CmdSaveModelDisplaySettingData::saveModelDisplaySettingData(int windowUniversalID, bool toolButtonActiveClipperIsChecked, bool toolButtonModelDisplayIsChecked, bool hasAnyGeometrySuccess)
    {
        m_windowUniversalID = windowUniversalID;
        m_toolButtonActiveClipperIsChecked = toolButtonActiveClipperIsChecked;
        m_toolButtonModelDisplayIsChecked = toolButtonModelDisplayIsChecked;
        m_hasAnyGeometrySuccess = hasAnyGeometrySuccess;
    }

} // namespace PostCommand
